﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DecoderRingTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void EncodeTest()
        {
            var enc = new DecoderRingLibrary.Decoder();
            enc.key = 3;
            var input = "ABC XYZ 123";
            var output = enc.Encode(input);

            var expected = "DEF ABC 123";

            Assert.AreEqual(expected, output);
        }

        [TestMethod]
        public void DecodeTest()
        {
            var enc = new DecoderRingLibrary.Decoder();
            enc.key = 3;
            var input = "ABC XYZ 123";
            var output = enc.Encode(input);
            var backAgain = enc.Decode(output);

            Assert.AreEqual(input, backAgain);
        }

        //[TestMethod]
        //public void DecodeTest2()
        //{
        //    var enc = new DecoderRingLibrary.Decoder();
        //    enc.key = 3;
        //    var input = "ABC XYZ 123";
        //    var output = enc.Encode(input);
        //    var backAgain = enc.Encode(output);



        //    Assert.AreEqual(input, backAgain);
        //}
    }
}
